hd=zeros(212);
for i=1:212
    i
    for j=i+1:212
        j
        pathdir='mesh/';
        path1=num2str(i);path2=num2str(j);
        [vertices1, faces1 ]= obj__read( [pathdir,'mesh',path1,'.obj'] );
        [vertices2, faces2 ]= obj__read( [pathdir,'mesh',path2,'.obj'] );
        P=vertices1';Q=vertices2';
        [hd(i,j), D] = HausdorffDist(P,Q,0);
    end
end
save('hdAll.mat','hd')
imshow(hd,[]);colorbar

% hd2=zeros(50);
% for i=1:50
%     a=i*ones(51-i,1);
%     hd2=hd2+diag(a,i-1);
% end
% imshow(hd2,[]);colorbar


% [X,Y]=meshgrid(1:212);
% mesh(X,Y,hd)






